package com.stylefeng.guns.modular.netcar.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.core.validater.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Insert;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("line_city")
 /**
 * 线路城市信息
 *
 * @author 张亚林
 * @Date 2018-10-25 11:21
 * @TableField(exist = false) 实现属性与数据库字段不一一对应
 */
public class LineCity extends Model<LineCity> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     * 自动生成后修改成实际的主键 
     */
    protected Serializable pkVal() {
        return this.lcId;
    }
    
    //扩展能查询字段
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    @JSONField(serialize = false)
    private String key ;
    //开始日期
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    @JSONField(serialize = false)
    private String sdate;
    //截止日期
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    @JSONField(serialize = false)
	private String edate;
    //排序字段
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    @JSONField(serialize = false)
	private String  sortField ;
	//排序
    @ApiModelProperty(hidden = true)
	@TableField(exist = false)
    @JSONField(serialize = false)
	private String sortOrder;

	
    @ApiModelProperty(value = "主键",hidden = true)
    @TableId(value = "lc_id",type= IdType.UUID)
    @NotNull(message = "主键不能为空",groups = Update.class)
    private String lcId;     //主键

    @ApiModelProperty(value = "城市名")
    @TableField("lc_name")
    @NotNull(message = "城市名不能为空",groups = {Insert.class,Update.class})
    private String lcName;     //城市名

    @ApiModelProperty(value = "使用状态，1启用，0禁用",required = true)
    @TableField("lc_is_alived")
    @NotNull(message = "使用状态不能为空",groups = {Insert.class,Update.class})
    private String lcIsAlived;     //使用状态，1启用，0禁用

    @ApiModelProperty(value = "创建人",hidden = true)
    @TableField("create_user")
    private String createUser;     //创建人

    @ApiModelProperty(value = "创建时间",hidden = true)
    @TableField("create_time")
    private Date createTime;     //创建时间

    @ApiModelProperty(value = "更新人",hidden = true)
    @TableField("update_user")
    private String updateUser;     //更新人

    @ApiModelProperty(value = "更新时间",hidden = true)
    @TableField("update_time")
    private Date updateTime;     //更新时间

    @ApiModelProperty(value = "拼音全拼的首字母")
    @TableField("lc_py")
    private String lcPy;     //拼音全拼的首字母

    @ApiModelProperty(value = "拼音全拼")
    @TableField("lc_py_all")
    private String lcPyAll;     //拼音全拼

    @ApiModelProperty(value = "姓的首字母")
    @TableField("lc_py_head")
    private String lcPyHead;     //姓的首字母

    @ApiModelProperty(value = "线路中心位置")
    @TableField("lc_center_position")
    private String lcCenterPosition;     //线路中心位置

    @ApiModelProperty(value = "线条颜色")
    @TableField("lc_line_color")
    private String lcLineColor;     //线条颜色

    @ApiModelProperty(value = "内容区域颜色")
    @TableField("lc_body_color")
    private String lcBodyColor;     //内容区域颜色

    @ApiModelProperty(value = "订单类型code CJ/JC",required = true)
    @TableField("oc_id")
    @NotNull(message = "订单类型不能为空",groups = {Insert.class,Update.class})
    private String ocId;     //订单类型code CJ/JC


}
